function validateEnroll(action, elStatus, params) {
    var link = '/customer/' + action + 'Validate.action';
    new Ajax.Request(
            (link),
    {
        method: "get",
        parameters: params,
        requestHeaders: {Accept: 'application/json'},
        onSuccess:function(transport) {
            var jsonData = transport.responseText.evalJSON();
            var urlImg = '/img/i/process.png';
            var img = Element('img', {src: urlImg, alt: ''});
            elStatus.update(img);
            if ('error' == jsonData.result) {
                urlImg = '/img/i/warning.png';
            }
            if ('success' == jsonData.result) {
                urlImg = '/img/i/accept.png';
            }
            img.src = urlImg;
            img.alt = jsonData.message;
            elStatus.update(img);
        }
    }
            );
}
